/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 counted_animation.cpp

	$Header: /heroes4/counted_animation.cpp $

	$NoKeywords: $

 ************************************************************************/

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "counted_animation.h"

#include "battlefield.h"

// counted animation base class
// ----------------------------------------------------------------------
t_counted_animation::t_counted_animation( t_battlefield& battlefield )
				   : t_combat_action_message_displayer( battlefield )
{
	m_animation_ended = false;
	m_battlefield.animation_started( this );
}

t_counted_animation::~t_counted_animation()
{
	animation_ended();
}

void t_counted_animation::animation_ended()
{
	erase_action_message();

	if (m_animation_ended)
		return;

	m_animation_ended = true;
	m_battlefield.animation_ended( this );
}

